import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { CorePvcWheelsVO, CorePvcWheelsForm, CorePvcWheelsQuery } from '@/api/system/corePvcWheels/types';

/**
 * 查询产品材质信息列表
 * @param query
 * @returns {*}
 */

export const listCorePvcWheels = (query?: CorePvcWheelsQuery): AxiosPromise<CorePvcWheelsVO[]> => {
  return request({
    url: '/system/corePvcWheels/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询产品材质信息详细
 * @param id
 */
export const getCorePvcWheels = (id: string | number): AxiosPromise<CorePvcWheelsVO> => {
  return request({
    url: '/system/corePvcWheels/' + id,
    method: 'get'
  });
};

/**
 * 新增产品材质信息
 * @param data
 */
export const addCorePvcWheels = (data: CorePvcWheelsForm) => {
  return request({
    url: '/system/corePvcWheels',
    method: 'post',
    data: data
  });
};

/**
 * 修改产品材质信息
 * @param data
 */
export const updateCorePvcWheels = (data: CorePvcWheelsForm) => {
  return request({
    url: '/system/corePvcWheels',
    method: 'put',
    data: data
  });
};

/**
 * 删除产品材质信息
 * @param id
 */
export const delCorePvcWheels = (id: string | number | Array<string | number>) => {
  return request({
    url: '/system/corePvcWheels/' + id,
    method: 'delete'
  });
};
